function IsLogin(){};
IsLogin.prototype.checkLogin = function(req , res , next){
	if(!req.session.admin){
		return res.redirect("/admin/login");
	}
	next();
};
IsLogin.prototype.checkNotLogin = function(req , res , next){
	if(req.session.admin){
		return res.redirect("back");
	};
	next();
}
module.exports = new IsLogin();
